home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 49
/
Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso
/
Aminet
/
util
/
rexx
/
Pixload-1.70.lha
/
Pixload-1.70
/
Pixload-Prefs
< prev
next >
Wrap
Text File
|
1994-04-16
|
5KB
|
224 lines
/**/
signal on halt
signal on break_c
call init
call CreateApp
call Lecture
call HandleApp
/************************************************/
init: procedure expose nb nbicon
l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
if AddLibrary("rxmui.library")~=0 then exit
call RxMUIOpt("debugmode showerr")
call open(chemin,"Pixload:Prefs/Pixload.prefs",'Read')
nbicon=readln(chemin)
nb=nbicon
close(chemin)
return
/***********************************************************************/
HandleApp: procedure expose nb nbicon
ctrl_c=2**12
do forever
call NewHandle("app","h",ctrl_c)
if and(h.signals,ctrl_c)>0 then exit
select
when h.event="QUIT" then exit
when h.event="DROPEVENT" then call DropFun(h.from,h.to)
otherwise interpret h.event
end
end
/* never reached */
/***********************************************************************/
CreateApp: procedure expose nb nbicon
app.Title="Pixload-Prefs"
app.Version="$VER: Pixload Prefs 1.70"
app.Author="Pixel Art - www.pixel-art.fr.st"
app.Base="Pixload-config"
app.SubWindow="win"
win.ID="MAIN"
win.Title="Pixload's settings"
win.Contents="mgroup"
mgroup.0="tex"
tex.class="group"
tex.frame="group"
tex.columns=7
tex.0=checkmark("large",0)
tex.1="texx0"
texx0.class="text"
texx0.contents=Parsetext("%0Horizontal Pixload bar")
tex.2="texx1"
texx1.class="numericbutton"
texx1.min=1
texx1.max=8
texx1.value=nbicon
tex.3="texx2"
texx2.class="text"
texx2.contents=Parsetext("%0Number of icons")
tex.4="texx3"
texx3.class="text"
texx3.contents=""
texx3.inputmode="relverify"
texx3.frame="button"
mgroup.1="ctrlg"
ctrlg.class="group"
ctrlg.frame="group"
ctrlg.columns=4
do i=0 to nbicon-1
k=i*4
ctrlg.k="bm1."i
bm1.i.class="gfxpic"
bm1.i.ShortHelp=Parsetext("%cCliquer sur le petit bouton si c'est un script\nClick on this little button if is a script")
bm1.i.source="Pixload:icones/"i
bm1.i.transparent=1
bm1.i.scale=70
bm1.i.precision="image"
bm1.i.draw=1
k=i*4+1
ctrlg.k="bm."i
bm.i=CheckMark("bm."i,0)
k=i*4+2
ctrlg.k="popf."i
popf.i.class="popasl"
popf.i.ShortHelp='Programs'
popf.i.string=string("file."i,"f")
k=i*4+3
ctrlg.k="gg."i
gg.i.class="group"
gg.i.ShortHelp=Parsetext("Help")
sa.i.CycleChain=1
gg.i.0=String("sa."i,"f")
end
if NewObj("APPLICATION","APP")>0 then exit
call Notify("win","CloseRequest",1,"APP","ReturnID","quit")
call Notify("texx3","selected",0,"app","Return","call Stocke(nb)")
call Notify("texx1","value","everytime","app","return","call stocke(h.value)","triggerattr")
call Notify("large","selected","everytime","app","Return","call Stocke(nb)")
call set("win","open",1)
return
/***************************************/
Lecture: procedure
call open(chemin,"Pixload:Prefs/Pixload.prefs",'Read')
nbicon=readln(chemin)
fichier.num=readln(chemin)
call set(large,"selected",fichier.num)
do num=0 while ~EOF(chemin)
fichier.num=readln(chemin)
if fichier.num~="" then do
if fichier.num==1 then call set(bm.num,"selected",fichier.num)
fichier.num=readln(chemin)
call set(file.num,"contents",fichier.num)
fichier.num=readln(chemin)
call set(sa.num,"contents",fichier.num)
end
end
call close(chemin)
call set("app","sleep",0)
return
/*--------------------------------*/
Stocke: procedure expose nb nbicon
Parse arg nbb
call open(adresse,"Pixload:Prefs/Pixload.prefs",'Write')
call WriteLN(adresse,nbb)
call WriteLN(adresse,xget("large","selected"))
nbb=nbb-1
do i=0 to nbb
if i~>nbicon-1 then do
call WriteLN(adresse,xget("bm."i,"selected"))
call WriteLN(adresse,xget("file."i,"contents"))
call WriteLN(adresse,xget("sa."i,"contents"))
end
else do
call WriteLN(adresse,"")
call WriteLN(adresse,"")
call WriteLN(adresse,"")
end
end
call set("texx3","contents",Parsetext("%c%0Save / Update"))
nb=nbb+1
call close(adresse)
if show('P','PIXLOAD.1') then
do
address 'PIXLOAD.1'
address command 'copy ram:env/mui/pixload.1.prefs to sys:prefs/env-archive/mui/pixload.1.prefs'
Quit
end
address command 'sys:c/wait sec=1'
address command 'sys:c/wbrun sys:wbstartup/Pixload'
return
/*------------- */
halt:
break=_c:
exit